<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文字最小宽度</title>
</head>
<body>
<style>
    span{
        display: inline-block;
        width: 0;
        margin: 50px;
    }
    .ao::before, .tu::before{
        /* 注意这里用的是outline 而不是 border */
        outline: 2px solid red;
    }
    .ao::before{
        content: "love我love";
    }

    .tu {
        /* 文字方向 从有向左 */
        direction:rtl;
    }
    .tu::before{
        direction: ltr;
        content: "我love你";
    }
</style>
<span class="ao"></span>
<span class="tu"></span>
</body>
</html>